import request from '@/utils/request'

export default {
  getAllLable() {
    return request({
      url: `/weddingadmin/label/getAll`,
      method: 'get'
    })
  },

  getLablePageVo(current, limit) {
    return request({
      url: `/weddingadmin/label/getLablePageVo/${current}/${limit}`,
      method: 'get',
    })
  },

  getLablePageQueryVo(current, limit, lableQuery){
    return request({
        url: `/weddingadmin/label/getLablePageQuery/${current}/${limit}`,
        method: 'post',
        data: lableQuery  //转化json传递
      })
  },

  deleteAllSelect(ids) {
    return request({
        url: `/weddingadmin/label/deleteAllSelect`,
        method: 'delete',
        data: ids
    })
  },

  getOneById(id) {
    return request({
        url: `/weddingadmin/label/getOneById/${id}`,
        method: 'get',
    })
  },
  
  deleteOneById(id) {
    return request({
        url: `/weddingadmin/label/deleteOneById/${id}`,
        method: 'delete',
    })
  },

  searchByName(lableName) {
    return request({
        url: `/weddingadmin/label/searchByName/${lableName}`,
        method: 'get',
    })
  },

  saveOrUpdate(lable) {
    return request({
        url: `/weddingadmin/label/saveOrUpdate`,
        method: 'post',
        data: lable,
    })
  },
  unForbid(id) {
    return request({
      url: `/weddingadmin/label/unForbid/${id}`,
      method: 'put',
    })
  },
  forbid(id) {
    return request({
      url: `/weddingadmin/label/forbid/${id}`,
      method: 'put',
    })
  },
}
